package com.ssww.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.ssww.dao.GuestBookDao;
import com.ssww.entity.GuestBook;
import com.ssww.service.GuestBookService;
/**
 * 
 * @author 
 *
 */
@Service
public class GuestbookServiceImpl implements GuestBookService {
	@Resource
	private GuestBookDao guestBookDao;
	
	@Transactional
	public GuestBook getGuestBookById(Integer id) {
		return guestBookDao.getGuestBookById(id);
	}
	@Transactional
	public List<GuestBook> getGuestBookList() {
		return guestBookDao.getGuestBookList();
	}
	@Transactional
	public int addGuestBook(GuestBook a) {
		guestBookDao.addGuestBook(a);
		return 0;
	}
	@Transactional
	public int deleteGuestBook(int id) {
		guestBookDao.deleteGuestBook(id);
		return 0;
	}
	@Transactional
	public int updateGuestBook(GuestBook a, int id) {
		guestBookDao.updateGuestBook(a, id);
		return 0;
	}
	
}
